package net.jxiny.oschina.tweet.Adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import net.jxiny.oschina.R;

import net.jxiny.oschina.tweet.enyity.Newest;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class NewestAdapter extends BaseQuickAdapter<Newest, BaseViewHolder> {

    public NewestAdapter(int layoutResId, @Nullable List<Newest> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, Newest item) {
        helper.setText(R.id.newest_title,item.getTitle());
        helper.setText(R.id.newest_time,item.getPubDate());
        helper.setText(R.id.newest_author,item.getAuthor());
        helper.setText(R.id.newest_Count,item.getAnswerCount());

    }
}
